Skip to main content

All Questions

Tagged with
0votes
1answer
112views

Monte Carlo Tree Search with Cops and Robber Game

I recently started trying to implement a monte carlo tree search based algorithm for playing cops and robber. The game is based on the cops and robber game and is played on an arbitrary graph (not ...
Raoul Luqué's user avatar
3votes
2answers
314views

Efficient way to Decouple classes in class design

I am working on a class design question - design a simple grocery store with a self-checkout system I am a beginner After briefly jotting down requirements, I started with the Product class as follows ...
darklion's user avatar
0votes
1answer
188views

Many if conditions

I have the code but I want to be pseudo as possible so I learn from other ways as much as possible. So what I am building is web based tool and in one section we have a table. This table renders lines ...
Codemenot's user avatar
-1votes
2answers
387views

More efficient FIFO inventory calculation?

I am implementing a basic ledger system for which I want to calculate costs based on the FIFO system. Is there a more clever method than an O(n) search? Example Suppose I have two lists of ...
poundifdef's user avatar
0votes
1answer
69views

Design a non replayable endpoint for a service

I am trying something out in Springboot and stuck with a weird issue where I want to send some data from my frontend (react app) to backend (SpringBoot) and make that request non replay able by users (...
Abhijeet Shukla's user avatar
-1votes
2answers
135views

How to measure how "changy" something is? [closed]

I need to think of a way to model how one thing is more "changy" than another. Say I need to index a news website's different news sections with some web crawler. I want to prioritise ...
user avatar
1vote
1answer
151views

Ranking results from a Question and Answer game

I have a question and answer trivia game app which randomly picks questions from a database and prompts the user to answer the question correctly. The total number of correct answers, the total number ...
user1527613's user avatar
4votes
1answer
1kviews

What is the most suitable data structure for IPv4 addresses with intersecting ranges?

Mostly in all routers and operating systems the Longest Prefix Match algorithm is used for searching the trie of IPv4 addresses. Packet filters like Iptables don't need some special data structure for ...
red0ct's user avatar
-4votes
1answer
69views

Calculate math function depend on N value [closed]

I have method with the following prototype : R[] = method(k,n) which : n = ordinal value 0 <n <10^9 k = math function depend on n value : i.e n^6 R = array of computed values For example : n = ...
whiteRice's user avatar
10votes
5answers
3kviews

Pros and cons of representing routes as legs or stops?

What are some pros and cons of representing routes as legs or as stops? A leg is a departure and arrival location, a departure time and a duration (or an arrival time and a duration). A stop is an ...
François Beausoleil's user avatar
-3votes
2answers
133views

What design pattern / class / interface should I use for encapsulating a program? [closed]

I am building a chess - related application, and I want to use a pre-compiled program called Stockfish as my chess engine. I am wondering what is the best practice to encapsulate the usage of the ...
Aviv Aviv's user avatar
0votes
0answers
2kviews

Is it possible to run an Excel macro-powered file on a server?

I've an Excel file (offline, on my computer) that elaborates medium-large amount of data using VBA Macros. Basically, this Excel macro-powered file works with a person that adds the data to an Excel ...
Backo's user avatar
-3votes
1answer
208views

How do I make items disappear based on the size of it's members?

Consider a list of items (take a list of voice channels) where each item has these attributes System::vc: List of voice channels. System::on_join(member, before, after): On the event when a member ...
Vivek Joshy's user avatar
0votes
1answer
81views

Pubsub model - publisher broadcast to remote subscribers

With a single publisher(go-routine) and multiple subscribers(go-routine) on same machine, below message hub help create pubsub model: type PublisherHub struct { subscribers map[*subscribmediator....
overexchange's user avatar
-1votes
1answer
58views

Resolving Dependencies and Incompatibilities Deterministically

Problem Description I'm working in Python and I've been having a problem designing something to handle the following (abstracted) system: I have some objects (lets call them Nodes) that can be in ...
Qudit's user avatar

153050per page
close